package cn.go.buster.launcher.api;

import android.os.Handler;
import android.os.Looper;

/**
 * @author logcat
 */
public class GoBuilder {
    private static volatile GoBuilder instance;

    private Handler mainThread;
    private Handler childThread;
    public static GoBuilder getDefault(){
        if(instance == null){
            synchronized (GoBuilder.class){
                if(instance == null){
                    instance = new GoBuilder();
                }
            }
        }
        return instance;
    }


    public Handler getMainThread() {
        if(mainThread == null){
            mainThread = new Handler(Looper.getMainLooper());
        }
        return mainThread;
    }


    public Handler getChildThread() {
        if(childThread == null){
            childThread = new Handler(Looper.getMainLooper());
        }
        return childThread;
    }
}
